<%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld"%>
<%@ taglib prefix="bean" uri="/WEB-INF/struts-bean.tld"%>
<%@ taglib prefix="logic" uri="/WEB-INF/struts-logic.tld"%>
<%@ taglib prefix="ar" tagdir="/WEB-INF/tags" %>
<%@ page import="arocms.Constans" %>

<logic:notPresent name="<%=Constans.USER_INFO%>">
    <html:form action="/Login.do" styleId="loginForm">
        <html:errors property="userName"/>
        <html:errors property="password"/>    
        User Name:
        <html:text property="userName"  value="arek"/>
        Password:
        <html:password property ="password" value="12345678"/>
        <a href="javascript:document.getElementById('loginForm').submit();" class="button">Login</a>
        <html:link styleClass="button" action="/Users/RegistrationForm">Register</html:link>
        
    </html:form>
</logic:notPresent>

<logic:present name="<%=Constans.USER_INFO%>">
    <div id="welcomeMessage">
        Welcome
        <div id="UserName">
            <bean:write name="<%=Constans.USER_INFO%>" property="name"/>
            <bean:write name="<%=Constans.USER_INFO%>" property="surname"/>
        </div>
        <html:link action="/Logout" styleClass="button">Logout</html:link>
    </div>
</logic:present>